<template>
    <div class="login">
        <label for="">
            账号:
            <input type="text" v-model="userName" />
        </label>
        <label for="">
            密码:
            <input type="text" class="passWord" v-model="passWord" />
        </label>
        <label for="">
            手机号:
            <input type="text" class="passWord-two" v-model="phone" />
        </label>
        <button @click="register">注册</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            userName: '',
            passWord: '',
            phone: ''
        };
    },
    methods: {
        register() {
            if(this.userName =='' || this.passWord =='' || this.phone == ''){
                    alert('内容不能为空!');
            } else {
                this.$router.push('/login');
            }
        }
    }
};
</script>

<style lang="scss" scoped>
.login {
    width: 300px;
    height: 200px;
    border: 1px solid #c9c9c9;
    background-color: rgba(29, 90, 204, 0.5);
    margin: 0 auto;
    margin-top: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    button {
        width: 60px;
        height: 30px;
        text-align: center;
    }
}
</style>
